package cn.xawl.gulimall.cart.config;

import cn.xawl.gulimall.cart.interceptor.CartTempUserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author lh
 * @create 2020-11-02 13:44
 **/
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartTempUserInterceptor()).addPathPatterns("/**");
    }
}
